package com.qf.erp_system_admin.service.impl;

import com.qf.erp_system_admin.entity.Refund;
import com.qf.erp_system_admin.mapper.RefundMapper;
import com.qf.erp_system_admin.service.RefundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * --- 一点都不难 ---
 *
 * @author DZW
 * @date 2024/7/26
 * @desc
 */
@Service
public class RefundServiceImpl implements RefundService {
    @Autowired
    private RefundMapper refundMapper;

    @Override
    public List<Refund> findAll(HashMap<String, String> map) {
        return refundMapper.findAll(map);
    }

    @Override
    public boolean delById(int id) {
        return refundMapper.delById(id);
    }

    @Override
    public boolean update(Refund refund) {
        refund.setReDoTime(new Date());
        return refundMapper.update(refund);
    }

    @Override
    public boolean delBatch(List<Integer> ids) {
        return refundMapper.delBatch(ids);
    }
}
